package com.senior.sendmessage.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author Baijl
 * @version 0.0.1
 * @date 2021-12-12 23:26
 * @description TODO
 */
@Data
@NoArgsConstructor
public class NewsDTO {
    @JsonProperty("reason")
    private String reason;
    @JsonProperty("result")
    private ResultDTO result;
    @JsonProperty("error_code")
    private Integer errorCode;

    @NoArgsConstructor
    @Data
    public static class ResultDTO {
        @JsonProperty("stat")
        private String stat;
        @JsonProperty("data")
        private List<DataDTO> data;
        @JsonProperty("page")
        private String page;
        @JsonProperty("pageSize")
        private String pageSize;

        @NoArgsConstructor
        @Data
        public static class DataDTO {
            @JsonProperty("uniquekey")
            private String uniquekey;
            @JsonProperty("title")
            private String title;
            @JsonProperty("date")
            private String date;
            @JsonProperty("category")
            private String category;
            @JsonProperty("author_name")
            private String authorName;
            @JsonProperty("url")
            private String url;
            @JsonProperty("thumbnail_pic_s")
            private String thumbnailPicS;
            @JsonProperty("thumbnail_pic_s02")
            private String thumbnailPicS02;
            @JsonProperty("thumbnail_pic_s03")
            private String thumbnailPicS03;
            @JsonProperty("is_content")
            private String isContent;
        }
    }
}
